package com.mall.service.order;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mall.client.order.MallItemOrderService;
import com.mall.custom.dao.read.MallItemOrderReadMapper;
import com.mall.custom.dao.write.MallItemOrderWriteMapper;
import com.mall.pojo.MallItemOrder;
import com.mall.pojo.MallItemOrderExample;
@Service
public class MallItemOrderServiceImpl implements MallItemOrderService {

	@Autowired
	private MallItemOrderReadMapper  mallItemOrderReadMapper;
	@Autowired
	private MallItemOrderWriteMapper mallItemOrderWriteMapper;
	@Override
	public MallItemOrder getMallItemOrderById(Long mallItemOrderId) {
		return mallItemOrderReadMapper.selectByPrimaryKey(mallItemOrderId);
	}
	@Override
	public void modifyMallItemOrder(MallItemOrder mallItemOrder) {
		this.mallItemOrderWriteMapper.updateByPrimaryKey(mallItemOrder);
		
	}
	@Override
	public void insertMallItemOrder(MallItemOrder mallItemOrder) {
		this.mallItemOrderWriteMapper.insert(mallItemOrder);
		
	}
	@Override
	public List<MallItemOrder> getMallItemOrderListByExample(MallItemOrderExample example) {
		return this.mallItemOrderReadMapper.selectByExample(example);
	}

}
